Changing Elasticsearch Configurations via SSH
Secure Shell, sometimes referred to as Secure Socket Shell, is a protocol which allows you to connect securely to a remote computer or a server by using a text-based interface.
When a secure SSH connection is established, a shell session will be started, and you will be able to make application-related changes in a container by issuing commands. This article wills show how you can do it.
Note: For the security purpose, only the account holders who pass our verification will be granted permission to the Shell / SSH service. If you would like to enable it, please update your billing information. Our staff will finish verifying your information within 2 hours.
1. Locate your target deployment
Log in to the Control Panel and locate your target deployment on the Home page or the My Applications page.
2.Go to the Shell / SSH page
Go to the Shell / SSH page by clicking the "Manage" button on the Home page or the My Applications page.
3. Change the configurations
locate the configuration file
Elasticsearch has three configuration files:
elasticsearch.yml for configuring Elasticsearch
jvm.options for configuring Elasticsearch JVM settings
log4j2.properties for configuring Elasticsearch logging
These files are located in the config directory.
Click the “Connect” icon on the Shell / SSH page to launch the command-line interface.
For security reasons, only the accounts have passed our verification will be granted permission to the Shell / SSH service. If you would like to enable it, please update your billing information. Our staff will finish verifying your information within 2 hours.
There are several SSH commands that you can use to work with or manipulate the directories (or folders) in your WordPress site.
ls
– Show Directory Contents (List the Names of Files)
cd
– Change Directory
Input the command “
ls
”, followed by pressing the “Enter” key to check the file under the /cloudclusters directory.Enter the command “cd config/” to change to the “/cloudclusters/config” directory, followed by the command “ls” to check the files under the directory.
Type in the command "ls", you can see the three configuration files.
Change the setting parameters
Select the configuration file you would like to make changes to. Take jvm.options for example. Input the command “vim jvm.options” to go to the editing interface.
Now press the “a” key on your keyboard so you can start changing configurations.
Scroll down the page and search for the parameters you would like to make changes to.
After the editing, hit the “Esc” key, followed by entering the “:wq” to save the changes.
Make the changes effective
Click “Reboot” on the Shell / SSH page to make the changes effective. Once you start the reboot process, the status will be changed to “Startup”. It may take 1-2 minutes to complete the reboot process. When it’s finished, the status will be changed back to “Running”, and you can repeat the steps as said above to check the configuration file.